<template>
    <div class='_page-content'>
      <div>
        <button @click="trigger">开始监听事件</button>
        <button @click="emit">触发事件</button>
        <button @click="getEvent">获取事件列表</button>
      </div>
      <aaa/>
    </div>
</template>

<script>
import aaa from  './aaa/index.vue'
export default {
    name:'',
    components:{aaa},
    props:{},
    data() {
        return{
          aa:112
        }
    },
    computed: {},
    watch: {},
    beforeDestroy() {},
    methods: {
      trigger(){
        this.$eventChannel.on('setName22',()=>{
          console.log('被触发了');
        })
      },
      emit(){
        this.$eventChannel.emit('setName22')
      },
      getEvent(){
        console.log(this.$eventChannel.getEvent());
      }
    },
}
</script>

<style lang="scss" scoped>
</style>